package com.hu.boot.controller;

import com.hu.boot.interceptors.Interceptor1;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class InterceptorController {

    // 声明一个日志对象
    private static final Logger log = LoggerFactory.getLogger(Interceptor1.class);

    @RequestMapping("/interceptor")
    public String testInterceptor(){
        log.info("方法体内容");
        return "测试";
    }
}
